public class C {
    static boolean test(String ss,String s) {
        for (int i = 0; i < ss.length(); i++) {
            if (ss.charAt(i)==s.charAt(i)) continue;
            if (s.charAt(i)=='0') continue;
            return false;
        }
        return true;
    }
    public static void main(String[] args) {
        int flg = 0;
        int count = 0;
        String s = "072050030";

        String[] ss = {
                "492357816",
                "834159672",
                "618753294",
                "276951438",
                "294753618",
                "438951276",
                "816357492",
                "672159834"
        };
        for (int i = 0; i < ss.length; i++) {
            if (test(ss[i],s)) {
                flg = i;
                count++;
            }
        }
        if(count==1){
            System.out.println(ss[flg].charAt(0)+" "+ss[flg].charAt(1)+" "+ss[flg].charAt(2));
            System.out.println(ss[flg].charAt(3)+" "+ss[flg].charAt(4)+" "+ss[flg].charAt(5));
            System.out.println(ss[flg].charAt(6)+" "+ss[flg].charAt(7)+" "+ss[flg].charAt(8));
        } else {
            System.out.println("Too Many!");
        }

    }
}
